window = {};

(function(){
	// 全局参数
	window.rootPath = "/boss";
	window.globalVar = {
		methodPost:"post",
		methodGet:"get",
		treeRestShowPath:window.rootPath+'/rest/menu/list',
		loginPath:window.rootPath+"/rest/user/login",
		logoutPath:window.rootPath+"/rest/user/logout",
		routePath:window.rootPath+"/rest/route/list",
		savePwdPath:window.rootPath+"/rest/user/savePwd",
		changePwdPath:window.rootPath+"/rest/user/changePwd",
		sysname:"后台综合管理系统",
		subSystemResourcesPath: [
		    'pms-server', //'boss-pms',
		    'dcs-server', //'boss-dcs-server',
		    'crm', //'boss-crm',
		    'report', //'boss-report',
		    'basic', //'boss-basic'
            'designer', //'boss-venues-designer',
            'order',
            'boss'
		], 
		sysparams : {
			mids : "1,2,3,4,5,6,7,20"
		}//系统ID
	};
})();

window.totalPath = {};
window.totalShim = {};
window.totalDependency = [];
window.totalRoutes = [];

var mdeps = [];

//框架的相关定义
mdeps.push('common/dependency/path.js');
mdeps.push('common/dependency/shim.js');
mdeps.push('common/dependency/dependency.js');
mdeps.push('common/dependency/routes.js');

//子系统的相关定义
if ((typeof(window.globalVar) != "undefined") &&
    (typeof(window.globalVar.subSystemResourcesPath) != "undefined")){
    for (var key in window.globalVar.subSystemResourcesPath) {
        mdeps.push(window.globalVar.subSystemResourcesPath[key] + '/dependency/path.js');
        mdeps.push(window.globalVar.subSystemResourcesPath[key] + '/dependency/shim.js');
        mdeps.push(window.globalVar.subSystemResourcesPath[key] + '/dependency/dependency.js');
        mdeps.push(window.globalVar.subSystemResourcesPath[key] + '/dependency/routes.js');
    }
};

define("maizuozuo", mdeps, function(){

    console.log("require.config({ ");
    console.log("	paths: ");
    console.log(window.totalPath);
    console.log("	, ");
    console.log("	shim: ");
    console.log(window.totalShim);
    console.log("}); ");
    console.log("require( ");
    console.log(window.totalDependency);
    console.log("	, function(){}); ");

});


require("maizuozuo");

//console.log(window.totalPath);
//console.log(window.totalShim);
//console.log(window.totalDependency);
//console.log(window.totalRoutes);

